#include<stdio.h>
int GPA(int xf, int cj)
{
    int jd;
    if(cj < 60) jd = 0;
    else jd = (cj - 50) / 10;

    return jd * xf;
}
int main()
{
    int jd, xf, cj, n;
    double sum_xf = 0, sum_gpa = 0;
    scanf("%d", &n);
    for(int i = 1; i <= n; i ++)
    {
        scanf("%d %d", &xf, &cj);
        sum_xf += xf;
        sum_gpa += GPA(xf, cj);
    }
    printf("%.1f", sum_gpa / sum_xf);
    return 0;
}